home *** CD-ROM | disk | FTP | other *** search
- /*
- * Please do not edit this file.
- * It was generated using rpcgen.
- */
-
- #include <stdio.h>
- #include <rpc/rpc.h>
- #include <sys/socket.h>
- #include <syslog.h>
- #include "inetray.h"
-
- #ifdef DEBUG
- #define RPC_SVC_FG
- #endif
- #include <sys/param.h>
- #ifndef ITIMER_REAL
- #include <sys/time.h> /* for A/UX */
- #endif
- #include "config.h"
-
- extern int _rpcpmstart; /* Started by a port monitor ? */
- extern int _rpcfdtype; /* Whether Stream or Datagram ? */
-
- void
- inetray_1(rqstp, transp)
- struct svc_req *rqstp;
- register SVCXPRT *transp;
- {
- union {
- iPrm init_1_arg;
- sfPrm startframe_1_arg;
- tbPrm traceblock_1_arg;
- int kill_1_arg;
- int wait_1_arg;
- int terminate_1_arg;
- } argument;
- char *result;
- bool_t (*xdr_argument)(), (*xdr_result)();
- char *(*local)();
-
- switch (rqstp->rq_proc) {
- case NULLPROC:
- (void) svc_sendreply(transp, xdr_void, (char *)NULL);
- return;
-
- case INIT:
- xdr_argument = xdr_iPrm;
- xdr_result = xdr_void;
- local = (char *(*)()) init_1;
- break;
-
- case STARTFRAME:
- xdr_argument = xdr_sfPrm;
- xdr_result = xdr_int;
- local = (char *(*)()) startframe_1;
- break;
-
- case TRACEBLOCK:
- xdr_argument = xdr_tbPrm;
- xdr_result = xdr_void;
- local = (char *(*)()) traceblock_1;
- break;
-
- case KILL:
- xdr_argument = xdr_int;
- xdr_result = xdr_int;
- local = (char *(*)()) kill_1;
- break;
-
- case WAIT:
- xdr_argument = xdr_int;
- xdr_result = xdr_int;
- local = (char *(*)()) wait_1;
- break;
-
- case TERMINATE:
- xdr_argument = xdr_int;
- xdr_result = xdr_void;
- local = (char *(*)()) terminate_1;
- break;
-
- default:
- svcerr_noproc(transp);
- return;
- }
- bzero((char *)&argument, sizeof(argument));
- if (!svc_getargs(transp, xdr_argument, &argument)) {
- svcerr_decode(transp);
- return;
- }
- result = (*local)(&argument, rqstp);
- if (result != NULL && !svc_sendreply(transp, xdr_result, result)) {
- svcerr_systemerr(transp);
- }
- if (!svc_freeargs(transp, xdr_argument, &argument)) {
- _msgout("unable to free arguments");
- exit(1);
- }
- return;
- }
-
- static
- _msgout(msg)
- char *msg;
- {
- #ifdef RPC_SVC_FG
- if (_rpcpmstart)
- syslog(LOG_ERR, msg);
- else
- (void) fprintf(stderr, "%s\n", msg);
- #else
- syslog(LOG_ERR, msg);
- #endif
- }
-